package cn.codenest.springboot.mongo.converter;

import cn.codenest.springboot.mongo.entity.StgtypeEntity;
import org.bson.json.StrictJsonWriter;
import org.springframework.core.convert.converter.Converter;

import java.util.ArrayList;

public class StgtypeConverter implements Converter<ArrayList, StgtypeEntity> {


    @Override
    public StgtypeEntity convert(ArrayList source) {
        if (source != null && source.size() > 0) {
            return (StgtypeEntity)source.get(0);
        }
        return null;
    }
}
